// 异常处理

#include <iostream>
using namespace std;

int main() {
    cout << "异常处理程序举例\n";

    int number;
    cout << "输入一个正数: ";
    cin >> number;

    try {
        if (number <= 0) {
            throw number;
        }
        else {
            cout << "你输入的正数是: " << number << "\n";
        }
    } catch (int i) {
        cout << "你输入的数是 " << i << ", 不是正数!\n";
    }
    cout << "程序运行正常，不是吗?\n";
}